package com.scott.aop.aspect;

import org.aspectj.lang.JoinPoint;
import org.slf4j.LoggerFactory;


public class LogAspect {

    private final static org.slf4j.Logger log = LoggerFactory.getLogger(LogAspect.class);

    public void before(JoinPoint joinPoint) {
        log.info("调用方法之前执行" + joinPoint);
    }

    public void after(JoinPoint joinPoint) {
        log.info("调用方法之后执行" + joinPoint);
    }


    public void afterReturn(JoinPoint joinPoint) {
        log.info("调用方法获得返回值之后" + joinPoint);
    }

    public void afterThrow(JoinPoint joinPoint) {
        log.info("抛出异常之后执行" + joinPoint);
    }


}
